<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <title>梯梯</title>
    <link rel="stylesheet" href="../css/admin.css">
     <link rel="stylesheet" href="../layui/css/layui.css">
   <!--   <link rel="stylesheet" href="../css/organzition.css">  -->
    <link rel="stylesheet" href="../css/operation.css">
    <link rel="stylesheet" href="../fonts/iconfont.css">        
</head>
<body>
<div class=" operation">
  <!--  表格部分 -->
<div class="detail">
     <table class="layui-table" lay-skin="line">
      <thead >
         <tr>  
           <th>&emsp;编&emsp;号&emsp;</th>
           <th>操作账户</th>
           <th>应用模块</th>
           <th>操作内容</th>
           <th>&emsp;时&emsp;间&emsp;</th>         
         </tr>
      </thead>
      <tbody class="org-table">
        <script type="text/html" id="tableTemp">
           <tr data-id={}>
           <td class="check"><input type="checkbox" name="" title="" lay-skin="primary" checked></td>
           <td>三三</td>
           <td>000</td>
           <td>12306</td>
           <td>户主</td>
           <td><span class="price">1000000.00</span></td>
         <!--   <td><a href="../商品统计.html">账户明细</a></td> -->
           <td><a href="javascript:;" data-url="./pages/公告管理.html" data-id="5">公告管理</a> </td>
           <td><a href="../商品统计.html">乘梯记录</a></td>
           </tr>
        </script>
      </tbody>
      </table>
    <div id="page-fen">
        <p id="page-counter">共有80条记录</p>
        <div id="page-num"></div>
    </div>
  </div>

   </div> 
   <!--  表格部分 --> 
  <script src="../lib/jquery.js" type="text/javascript"></script>
  <script type="text/javascript" src="../layui/layui.js"></script>
  <script type="text/javascript" src="../js/organization.js"></script>
  <script src="../lib/js/jquery.cookie.js" type="text/javascript"></script>
  <script src="../lib/js/jquery.treeview.js" type="text/javascript"></script>
<script type="text/javascript">
  layui.use(['jquery', 'laydate','form','layer','laypage'], function(){
      var $ = layui.jquery,
          laydate = layui.laydate,
          layer = layui.layer,
          laypage = layui.laypage;
        /*  or需要*/
         var element = layui.element;
        /*table渲染部分*/
                var a = {count: 10};
        searchTable(a);
        function searchTable(param){
          $.ajax({
          url: 'http://api.douban.com/v2/movie/in_theaters',
          type: 'get',
          dataType: 'jsonp',
          data: param || {},
          // success: function(data){
          //   console.log("success");
          // }
        })
        .done(function(data){
          console.log(data);
          var str= '';
          if(data.subjects.length){
            for(var i=0;i<data.subjects.length;i++){
            str +=
            '<tr>'+
            /*'<td class="check"><input type="checkbox" name="" title="" lay-skin="primary" checked></td>'+*/

            '<td>'+  1   +'</td>'+
            '<td>'+ data.subjects[i].year +'</td>'+
            '<td>'+ data.subjects[i].subtype +'</td>'+
            '<td>'+ data.subjects[i].title +'</td>'+
            '<td><span class="price">'+ data.subjects[i].title +'</span></td>'+      
            '</tr>'
          }
          $(".org-table").html(str);
     
        }else{
          str = '<tr><td colspan="7">暂无数据</td></tr>';
          $(".org-table").html(str);
        }
        })
        .fail(function() {
          console.log("error");
        });
        }
     /*分页js的实现*/
 laypage({
    cont: 'page-num'
    ,pages: 8
    ,first: 1
    ,last:false
    ,groups:6
    ,prev: '<em><</em>'
    ,next: '<em>></em>'
  });
/*分页js的实现*/
            // 开始时间及截止时间
            var start = {
         choose: function(datas){
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
          }
        };        
        var end = {
          choose: function(datas){
            start.max = datas; //结束日选好后，重置开始日的最大日期
          }
        };
      $('#start').click(function(){
        start.elem = this;
          laydate(start);
      });

      $('#end').click(function(){
        end.elem = this
          laydate(end);
      });    
 });
</script>
 

</body>
</html>
